//
//  KAboutUsViewController.m
//  KCZ_B段项目
//
//  Created by dllo on 15/11/11.
//  Copyright © 2015年 Sky. All rights reserved.
//

#import "KAboutUsViewController.h"
#import "FitHeader.h"
#import "FontSizeSingleTon.h"
#define FontSize [[FontSizeSingleTon shareFontSize]array]
@interface KAboutUsViewController ()<UIScrollViewDelegate>

@property(nonatomic, retain)UIScrollView *scrollView;
@property(nonatomic, retain)NSArray *array;

@end

@implementation KAboutUsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"关于我们";
    self.view.backgroundColor = [UIColor whiteColor];
}

-(void)loadView
{
    [super loadView];
    self.array = @[@"guanyu1",@"guanyv2",@"guanyu3"];
    self.view.backgroundColor = [UIColor yellowColor];
    _scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    _scrollView.contentSize = CGSizeMake(self.array.count * self.view.frame.size.width, self.view.frame.size.height - 64 * ht);
    _scrollView.pagingEnabled = YES;
    _scrollView.bounces = NO;
    _scrollView.delegate = self;
    _scrollView.contentOffset = CGPointMake(0, 0);
    for (NSInteger i = 0; i < _array.count; i++) {
        UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(i * self.view.frame.size.width, 0, self.view.frame.size.width, self.view.frame.size.height )];
        imageView.image = [UIImage imageNamed:_array[i]];
        [_scrollView addSubview:imageView];
    }
    [self.view addSubview:self.scrollView];
    
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(0 * wt, 465 * ht, 375 * wt, 130 * ht)];
label.backgroundColor = [UIColor colorWithRed:0.19 green:0.75 blue:0.6 alpha:0.4];
    [self.view addSubview:label];
    
    UILabel *textLabel = [[UILabel alloc]initWithFrame:CGRectMake(20 * wt, 465 * ht, 335 * wt, 130 * ht)];
    //textLabel.backgroundColor = [UIColor colorWithRed:0.19 green:0.75 blue:0.6 alpha:0.4];
    textLabel.textColor = [UIColor darkGrayColor];
    textLabel.numberOfLines = 0;
    textLabel.text = @"让我们在平平常常的吃饭烧菜中享受美食的乐趣，感悟精彩的人生,把美食变成一道道饱含美食文化、美食艺术、美食品味、充满诱情画意、人生哲理的心灵鸡汤。";
    textLabel.font = [UIFont systemFontOfSize:[FontSize[1] integerValue]];
    [self.view addSubview:textLabel];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
